﻿using System.Web.Mvc;

namespace CodeContrib.Web.Mvc
{
	// http://elegantcode.com/2009/11/07/asp-net-mvc-javascriptview/
	public class JavaScriptViewResult : ViewResult
	{
		public override void ExecuteResult(ControllerContext context)
		{
			base.ExecuteResult(context);

			var response = context.HttpContext.Response;
			response.ContentType = "application/x-javascript";
		}
	}
}